package cn.yitun.chat.yitunservercommonlib.converter.po2vo.user;


import cn.yitun.chat.yitunservercommonlib.converter.dto2vo.user.UserChatContentDto2VoConverter;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.userchat.LastChatInfo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.userchat.LastChatVo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface UserLastChatPo2VoConverter {

    UserChatContentDto2VoConverter INSTANCE = Mappers.getMapper(UserChatContentDto2VoConverter.class);

    LastChatInfo po2vo(LastChatVo vo);

    List<LastChatInfo> po2vo(List<LastChatVo> voList);

    @InheritInverseConfiguration
    LastChatVo vo2po(LastChatInfo dto);

    @InheritInverseConfiguration
    List<LastChatVo> vo2po(List<LastChatInfo> dtoList);
}
